package BLL;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
 * @author 陈显彩
 * @version 2021.0601
 * @since 1.8
 */

/**
 * 磁盘目录
 */
public class MemoryInfo {
    /**
     * 获取磁盘列表
     * @return 所有磁盘
     */
    public static List<String> getDisk(){
        List<String> list = new ArrayList<>();
        for(char d = 'A'; d <= 'Z'; ++d){
            String diskname = d + ":";
            File Disk = new File(diskname);
            if(Disk.exists()){
                String diskpath = d + ":";
                list.add(diskpath);
            }
        }
        return list;
    }
}
